<!DOCTYPE html>
<html lang="en">
<head th:replace="~{/common/header::header-head}">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="~{/common/header::header-body}"></div>

<div class="container mb-3 mt-3">
    <form th:action="@{'/back/article/publish/'+${article==null?'':article.getId()}}" method="post">
        <label for="title" class="form-label">标题</label>
        <input type="text" class="form-control" id="title" name="title" required th:value="${article==null?'':article.getTitle()}">

        <label for="category" class="form-label">分类</label>
        <input type="text" class="form-control" id="category" name="category" required th:value="${article==null?'':article.getCategory()}">

        <label for="comment" class="form-label">内容</label>
        <textarea class="form-control" rows="5" id="comment" name="content" required th:text="${article==null?'':article.getContent()}"></textarea>
        <button type="submit" class="btn btn-primary">发布</button>
    </form>
</div>

</body>
<style>
    body {
        height: 100%;
        /*background-image: url("../../static/assets/img/index_cover.jpg");*/
        background: rgb(100, 100, 100, 0.3);
        z-index: -1;
        /*opacity: 0.5;*/
    }
    .btn-primary{
        color: #fff;
        background-color: deeppink;
        border-color: white;
        margin: 10px 0 10px 0;
        width: 100%;
        border-radius: 5px;
    }
    .btn-primary:hover{
        background-color: #9f1d66;
    }
    .form-control:focus{
        color: #fff;
        background-color: pink;
        border-color: deeppink;
        box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .25);
    }

</style>
</html>